home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / t-adainc / s-retico.adb < prev    next >
Text File  |  1994-05-19  |  3KB  |  77 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                 S Y S T E M . R E A L _ T I M E . C O N V                --
  6. --                                                                          --
  7. --                                  B o d y                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.4 $                             --
  10. --                                                                          --
  11. --           Copyright (c) 1991,1992,1993, FSU, All Rights Reserved         --
  12. --                                                                          --
  13. --  GNARL is free software; you can redistribute it and/or modify it  under --
  14. --  terms  of  the  GNU  Library General Public License as published by the --
  15. --  Free Software Foundation; either version 2,  or  (at  your  option) any --
  16. --  later  version.   GNARL is distributed in the hope that it will be use- --
  17. --  ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
  18. --  MERCHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. --  eral Library Public License for more details.  You should have received --
  20. --  a  copy of the GNU Library General Public License along with GNARL; see --
  21. --  file COPYING. If not, write to the Free Software Foundation,  675  Mass --
  22. --  Ave, Cambridge, MA 02139, USA.                                          --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. package body System.Real_Time.Conv is
  27.  
  28.    -----------------------
  29.    -- Time_To_Stimespec --
  30.    -----------------------
  31.  
  32.    function Time_To_Stimespec
  33.      (T    : Real_Time.time)
  34.       return Task_Clock.Stimespec
  35.    is
  36.    begin
  37.       return Task_Clock.Stimespec (T);
  38.    end  Time_To_Stimespec;
  39.  
  40.    -----------------------
  41.    -- Stimespec_To_Time --
  42.    -----------------------
  43.  
  44.    function Stimespec_To_Time
  45.      (T    : Task_Clock.Stimespec)
  46.       return Real_Time.Time
  47.    is
  48.    begin
  49.       return Real_Time.Time (T);
  50.    end Stimespec_To_Time;
  51.  
  52.    ----------------------------
  53.    -- Time_Span_To_Stimespec --
  54.    ----------------------------
  55.  
  56.    function Time_Span_To_Stimespec
  57.      (T    : Real_Time.Time_Span)
  58.       return Task_Clock.Stimespec
  59.    is
  60.    begin
  61.       return Task_Clock.Stimespec (T);
  62.    end  Time_Span_To_Stimespec;
  63.  
  64.    ----------------------------
  65.    -- Stimespec_To_Time_Span --
  66.    ----------------------------
  67.  
  68.    function Stimespec_To_Time_Span
  69.      (T    : Task_Clock.Stimespec)
  70.       return Real_Time.Time_Span
  71.    is
  72.    begin
  73.       return Real_Time.Time_Span (T);
  74.    end Stimespec_To_Time_Span;
  75.  
  76. end System.Real_Time.Conv;
  77.